

{$CLEO .cs}


//0ACA: show_text_box "P1 ready"
//0390: load_txd_dictionary 'battle'
//038F: load_texture "test" as 0 // Load dictionary with 0390 first
model.Load(#BAT)
model.Load(#TEC9)
model.Load(#CAMERA)
model.Load(#GRENADE)
model.Load(#SAWNOFF)
model.Load(#COLT45)

038B: load_requested_models
//0209: 18@ = random_int_in_ranges 0 7
marker.CreateAboveActor(30@, $PLAYER_ACTOR)

marker.SetColor(30@, 0)
07BF: set_marker 30@ tracking_blip 1

018B: set_marker 30@ radar_mode 2
07BF: set_marker 30@ tracking_blip 1

const
MUSIC_PLAYS = 25@
KILLED =  26@

end

18@ = 2
//MUSIC_PLAYS = //audiostream.Load("cleo\battle_maps\bunker2.mp3")
////audiostream.PerformAction(MUSIC_PLAYS, play)
////audiostream.Loop(MUSIC_PLAYS,1)
//KILLED = //audiostream.Load("cleo\battle_maps\death2.mp3")
if 
056D:   actor $PLAYER_ACTOR defined

then
gosub @respawn
end


:1
0209: 18@ = random_int_in_ranges 0 7
wait 0
gosub @player_dead 
//gosub @score 
if
$onmission  == 0
jf @2
:jump

//0391: release_textures
marker.Disable(30@)
0169: set_fade_color_RGB 0 0 0
//audiostream.Release(MUSIC_PLAYS)
//audiostream.Release(KILLED)
0A93: end_custom_thread

end_thread

:2 
if
$actor_sweet == 0
jf @1
0A92: create_custom_thread "battle_maps\gang_house\respawnP1.cs"
jump @jump 


:player_dead
02C0: store_to 19@ 20@ 21@ ped_path_coords_closest_to 22@ 23@ 24@


04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -1.0 
if
actor.Dead($playeR_actor)
then
//0169: set_fade_color_RGB 255 0 0

//audiostream.PerformAction(MUSIC_PLAYS, PAUSE)
//audiostream.PerformAction(killed, play)
0169: set_fade_color_RGB 0 0 0
048F: actor $PLAYER_ACTOR remove_weapons 
0223: set_actor $PLAYER_ACTOR health_to 9999999 
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 1@ 2@ 3@ 
0ACB: show_styled_text "~r~You died!" time 3000 style 7 
04D7: set_actor $PLAYER_ACTOR locked 1 
player.CanMove($player_char) = false
$actor_smoke += 1 //score to player 2
0581: enable_radar 0
0826: enable_hud 0

gosub @Dead_animes 
gosub @headshot 
0001: wait 200 ms 
//02FD: show_text_2numbers_lowpriority GXT 'score' numbers $411 $412 time 3000 flag 1  // Info
//03F0: enable_text_draw 1 
//03E0: draw_text_behind_textures 1
///038E: draw_box_position 320.0 224.0 size 9999.0 9999.0 RGBA 0 0 0 180

//
//03E3: set_texture_to_be_drawn_antialiased 1
//038D: draw_texture 0 position 325.0 225.0 size 900.0 900.0 RGBA 100 0 0 180 
016A: fade 0 time 3000 
0001: wait 5000 ms 
0169: set_fade_color_RGB 0 0 0
016A: fade 1 time 3000 
0581: enable_radar 1
0826: enable_hud 1
//audiostream.PerformAction(killed, stop)
//audiostream.PerformAction(MUSIC_PLAYS, RESUME)
gosub @respawn 

end
return





:Dead_animes 

if
056D:   actor $PLAYER_ACTOR defined

then
if
8965: not  actor $PLAYER_ACTOR swimming

else_jump  @water_death 
:animes 
0209: 17@ = random_int_in_ranges 0 7
if
17@ == 0
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KO_shot_stom" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 1
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KO_shot_front" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 2
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KO_skid_front" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 3
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KO_spin_L" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 4
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KO_spin_r" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 5
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KO_skid_back" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 6
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KD_left" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 6
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KD_right" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 7
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KD_right" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
end
return

:headshot 
if
09A8:   actor $PLAYER_ACTOR headshoted
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KO_shot_face" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

wait 5
0ACB: show_styled_text "~r~You have been headshotted!" time 3000 style 7 
$actor_smoke += 1

end
return

:water_death 
0812: AS_actor $PLAYER_ACTOR perform_animation "Drown" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

return




:respawn

if
056D:   actor $PLAYER_ACTOR defined
then
:spawn
if
18@ == 0
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at   4022.0991 -927.5729 35.7088
actor.Angle($PLAYER_ACTOR) =  180.1843
return
end
if
18@ == 1
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at   4059.3247 -997.7477 35.7088
actor.Angle($PLAYER_ACTOR) =   9.2722
return
end
if
18@ == 2
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at  4003.4946 -974.3678 35.7088
actor.Angle($PLAYER_ACTOR) =   358.2107
return
end
if
18@ == 3
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at   4015.3933 -881.345 35.7088
actor.Angle($PLAYER_ACTOR) =  274.2106
return
end

if
18@ == 4
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at  4097.4946 -890.9431 32.7087
actor.Angle($PLAYER_ACTOR) = 107.2918
return
end

if
18@ == 5
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at  4108.981 -878.5341 35.7088
actor.Angle($PLAYER_ACTOR) =   83.5331
return
end


if
18@ == 6
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at   4094.2839 -963.2451 35.7088
actor.Angle($PLAYER_ACTOR) =   88.7716

return
end


if
18@ == 7
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at   4110.1216 -1018.2223 35.7088
actor.Angle($PLAYER_ACTOR) =   359.3138
return
end
if
18@ == 8
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at   4101.3301 -968.4468 31.2087
actor.Angle($PLAYER_ACTOR) =   15.4638
return
end

:the_end
end
return






:loadouts
player.CanMove($player_char) = true
//0792: disembark_instantly_actor $PLAYER_ACTOR
04D7: set_actor $PLAYER_ACTOR locked 0
0687: clear_actor $PLAYER_ACTOR task
0605: actor $PLAYER_ACTOR perform_animation "IDLE_stance" IFP "ped" framedelta 4.0 loop 0 lockX 0 lockY 0 lockF 0 time 1000

actor.Health($PLAYER_ACTOR) = 9999
actor.GiveWeaponAndAmmo($PLAYER_ACTOR,pistol, 120)
actor.GiveWeaponAndAmmo($PLAYER_ACTOR,sawnoff, 50)
actor.GiveWeaponAndAmmo($PLAYER_ACTOR,baseballbat, 120)
actor.GiveWeaponAndAmmo($PLAYER_ACTOR,tec9, 200)

0687: clear_actor $PLAYER_ACTOR task

return



































